// src/store/breadcrumbSlice.ts
import { createSlice, PayloadAction } from "@reduxjs/toolkit";

interface BreadcrumbState {
  path: string;
}

const initialState: BreadcrumbState = {
  path: "",
};

const breadcrumbSlice = createSlice({
  name: "breadcrumb",
  initialState,
  reducers: {
    setPath(state, action: PayloadAction<string>) {
      state.path = action.payload;
    },
  },
});

export const { setPath } = breadcrumbSlice.actions;
export default breadcrumbSlice.reducer;
